package com.jstorm.count.mapper.network;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @ProjectName: common
 * @Package: com.jstorm.count.mapper.network
 * @ClassName: NetworkMapper
 * @Description:
 * @Author: Mr_hu
 * @CreateDate: 2018/12/28 18:34
 * ***********************************************************
 * @UpdateUser: Mr_hu
 * @UpdateDate: 2018/12/28 18:34
 * @UpdateRemark: The modified content
 * @Version: 1.0
 * ***********************************************************
 * Copyright: Copyright (c) 2018
 **/
@Mapper
public interface NetworkMapper {

    @Select( "select table_name as metadataName  ,num_rows as metadataCount  from all_tables WHERE table_name LIKE  '%T_WB_NET%' ORDer by num_rows desc")
    List<Map<String, Object>>  selectCount();


    @Select("select sum(metadataCount) as Total_count,'网络协议特征采集服务'as Total_name   from (select table_name as metadataName  ,num_rows as metadataCount  \n" +
            "     from all_tables WHERE table_name LIKE  '%T_WB_NET%' ORDer by num_rows desc)")
    List<Map<String, Object>>   selectNetworkTotal();

}
